<template>
    <div id="nucleicpay">
        <div class="bigbox">
            <el-card class="box-card">
                <span class="text" style="">请扫码付款{{ this.$store.state.price }}元</span>
                <br>
                <img class="image" :src="url" alt="">
                <router-link
                    :to="{ path:'/3-3'}"
                    style="text-decoration: none"
                >
                    <div class="btn">
                        <el-button type="primary" round @click="savecheck">确认</el-button>
                    </div>
                </router-link>
            </el-card>
        </div>
    </div>
</template>

<script>
import axios from 'axios'

export default {
    data() {
        // imgurl:require('@/assets/images/pay.jpg')
        return {
            url: require('@/assets/images/pay.jpg'),
            account: this.$store.state.currentUser.account,
            checkId: this.$store.state.checkId,
        };
    },
    methods: {
        savecheck: function () {
            var that = this;
            axios.post("http://localhost:8848/saveTriageCheck", {account: that.account, checkId: that.checkId})
                .then(function (response) {
                    console.log(response);
                })
            alert("支付成功，请前往指定地点完成核酸检测。")
        }
    },
    comments: {},
    mounted() {


    }
};
</script>

<style scoped>
.el-card {
    margin-top: 20px;
}

.el-button {
    width: 200px;
}

.btn {
    display: flex;
    justify-content: center;
}

.text {
    font-size: 30px;

}

.image {
    margin-left: 90px;
    width: 60%
}

.bigbox {
    display: flex;
    justify-content: center;
}

.text {
    font-size: 30px;
}

.item {
    padding: 18px 0;
}

.box-card {
    width: 480px;
}
</style>
